from lxml import etree

xml_doc= '''
<bookstore>
    <book>
        <title lang="eng">Harry Potter</title>
        <price>29.99</price>
    </book>
    <book>
        <title lang="eng">Learning XML</title>
        <price>39.95</price>
    </book>
</bookstore>
'''

root_node = etree.fromstring(xml_doc)

print(root_node)

print(root_node[:])
print(root_node[0])
print(root_node[1])

print(root_node.tag)